pp108 : Adding and Associating Multiple Models

Adding and Associating Multiple Models

This topic describes the procedure to add and associate multiple models in an XForm.

While creating an XForm using Process Platform Web service operations, you can add more than one model to the XForm and associate them using common parameters.

  1. Create an XForm using a Web Services. The UI generatedfrom the Web service operation is displayed in the designer area.
  2. Drag the second Web service operation to the XForm from the WebserviceBindingOperation group in the Insert tab. The Generate Input and Output UI dialog box appears.
  3. Make appropriate modifications and click OK.
    • Select Generate UI for Input message to generate an input UI.
    • Select Generate UI for Output message to generate an output UI.

      Note:
      For details about generating UI, see Generating Input and Output User Interfaces.

      The Confirm dialog box appears. It lists the models that already exist in the XForm, and prompts you to confirm if you want to associate the new model with any of the existing models.
  4. Select the model with which you want to associate the new model in the Confirm dialog box. The Single Transaction check box appears in the Confirm dialog box. Also, the or images appear for the selected model to indicate whether the association will be successful or not.

    Note:

    • The Single Transaction option is also available in the Model Properties dialog box.
    • Association between models is based on the availability of common parameters between the models. indicates that the models contain common parameters and hence their association will be successful. indicates that the models do not contain any common parameters and hence their association will not be successful.
  5. Select Single Transaction.

    Note:

    • Single transaction is not supported for WS-AppServer models or models associated with WS-AppServer models. The Single Transaction check box is disabled when you select a WS-AppServer model for association.
    • The Single Transaction option is also available in the Model Properties dialog box.
    This enables the application to save changes made to both the associated models in a single transaction at run time.
    In cases where auto-generated parameters from the parent model are required to be specified in the child model, enabling the Single Transaction option ensures that values are automatically specified and saved for the child model. The required parameter for the parent model is first autogenerated and saved, and then automatically specified for the child model and saved. All this is done in a single transaction with the backend.
  6. Click Yes in the Confirm dialog box to associate the models.

    Note: Click No to avoid the association.

The models are associated as specified and the UI of the new model is displayed in the Designer Area.

Note:

  • You can create associations between transactional models only. Associations between non-transactional models is not supported.
  • You must ensure that the models to be associated comprise common connectors.
  • The updateDocument event object property of the onbeforesynchronize event can be used to modify the data of the corresponding model only. We recommend that you do not modifyupdateDocumentfor all associated models in case of single transaction.